using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Collections.Generic;
namespace Kunlun.Models
{
    [Table("Consumers")]
      public class Consumer
      {
         [ScaffoldColumn(false)]           
         public int ID { get; set; }

         [Required(ErrorMessage = "用户名不能空")]  
         [DisplayName("用户名")] 

         public string UserName { get; set; }
         [Required(ErrorMessage = "密码不能空")]  
         [DisplayName("密码")] 
          [DataType(DataType.Password)]
         public string Password { get; set; }
         [Required(ErrorMessage = "注册邮箱不能空")]  
         [DisplayName("注册邮箱")] 
          [DataType(DataType.EmailAddress)]
         public string Email { get; set; }
         [DisplayName("真实姓名")] 
         public string RealName { get; set; }
         [DisplayName("性别")] 
          
         public int Sex { get; set; }
         [DisplayName("固定电话")] 
         public string Phone { get; set; }
         [DisplayName("手机号码")] 
         public string Mobile { get; set; }
         [DisplayName("QQ号码")] 
         public string QQ { get; set; }

         [Required(ErrorMessage = "状态(0:未开通1:开通2:已激活)不能空")]  
         [DisplayName("状态(0:未开通1:开通2:已激活)")] 
         public int Status { get; set; }
         [DisplayName("自我描述")] 
          [DataType(DataType.MultilineText)]
         public string Description { get; set; }
         [DisplayName("出生日期")] 
         public DateTime BirthDay { get; set; }
         [DisplayName("详细地址")]
         public string Street { get; set; }
         [Required(ErrorMessage = "注册时间不能空")]  
         [DisplayName("注册时间")] 
         public DateTime RegDate { get; set; }
         [DisplayName("注册IP")] 
         public string RegIP { get; set; }
         [DisplayName("积分")] 
         public int Scoring { get; set; }
         [DisplayName("消费积分数")] 
         public int Scored { get; set; }
         [DisplayName("推荐人")] 
         public string Commender { get; set; }
         [DisplayName("是否订阅网站打折信息")] 
         public bool IsRss { get; set; }
         [DisplayName("是否黑名单(不支持货到付款)")] 
         public bool Blacklist { get; set; }
         [DisplayName("账户余额")] 
         public decimal LeaveMoney { get; set; }
         [DisplayName(" ")] 
         public DateTime LastUpdateTime { get; set; }
         [ForeignKey("UserID")]
         public virtual ICollection<Consumer_library> Consumer_library { get; set; }
          [ForeignKey("UserID")]
         public virtual ICollection<Consumer_pic> Consumer_pic { get; set; }         
          [ForeignKey("Uid")]          
         public virtual ICollection<Address> Address { get; set; }
         } 
} 
